<!--{eval $_TPL['nosidebar']=1;}-->
<!--{template header}-->

<!--{if $narrowlist || $widelist}-->
<script type="text/javascript" src="source/script_swfobject.js"></script>
<!--{/if}-->

<div id="space_page">

	<div id="ubar">

		<div id="space_avatar">
			<!--{if $space[magicstar] && $space[magicexpire]>$_SGLOBAL[timestamp]}-->
			<div class="magicstar">
			<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="200" height="250">
				<param name="movie" value="image/magic/star/{$space[magicstar]}.swf" />
				<param name="quality" value="high" />
				<param NAME="wmode" value="transparent">
				<embed src="image/magic/star/{$space[magicstar]}.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"  wmode="transparent" width="200" height="250"></embed>
			</object>
			</div>
			
			<div class="magicavatar"><!--{else}--><div><!--{/if}--><!--{avatar($space[uid],big)}--></div>
			
		</div>

		<!--{if $space[self] && $_SGLOBAL[magic][superstar]}-->
		<div class="borderbox">
			<div style="width:100%; overflow:hidden;">
			<img src="image/magic/superstar.small.gif" class="magicicon" />
			<!--{if $space[magicstar] && $space[magicexpire]>$_SGLOBAL[timestamp]}-->
			<a id="a_magic_superstar" href="cp.php?ac=magic&op=cancelsuperstar" onclick="ajaxmenu(event, this.id)">取消超级明星</a>
			<!--{else}-->
			<a id="a_magic_superstar" href="magic.php?mid=superstar" onclick="ajaxmenu(event, this.id, 1)">我要变超级明星</a>
			<!--{/if}-->
			</div>
		</div><br />
		<!--{/if}-->

		<div class="borderbox">
			<ul class="spacemenu_list" style="width:100%; overflow:hidden;">
		<!--{if $space[self]}-->
			<li><a href="cp.php?ac=avatar">我的头像</a></li>
			<li><a href="cp.php?ac=profile">个人资料</a></li>
			<li><a href="cp.php?ac=theme">主页风格</a></li>
			<li><a href="cp.php?ac=credit">我的积分</a></li>
			<!--{if $_SCONFIG[sendmailday]}-->
			<li><a href="cp.php?ac=sendmail">邮件提醒</a></li>
			<!--{/if}-->
			<li><a href="cp.php?ac=privacy">隐私筛选</a></li>
		<!--{else}-->
			<!--{if !$space['isfriend']}-->
			<li><img src="image/icon/friend.gif"><a href="cp.php?ac=friend&op=add&uid=$space[uid]" id="a_friend_li" onclick="ajaxmenu(event, this.id, 1)">加为好友</a></li>
			<!--{/if}-->
			<li><img src="image/icon/wall.gif"><a href="#comment">给我留言</a></li>
			<li><img src="image/icon/poke.gif"><a href="cp.php?ac=poke&op=send&uid=$space[uid]" id="a_poke" onclick="ajaxmenu(event, this.id, 1)">打个招呼</a></li>
			<li><img src="image/icon/pm.gif"><a href="cp.php?ac=pm&uid=$space[uid]" id="a_pm" onclick="ajaxmenu(event, this.id, 1)">发送消息</a></li>
			<!--{if $space['isfriend']}-->
			<li><img src="image/icon/friend.gif"><a href="cp.php?ac=friend&op=ignore&uid=$space[uid]" id="a_ignore" onclick="ajaxmenu(event, this.id)">解除好友</a></li>
			<!--{/if}-->
			<li><img src="image/icon/report.gif"><a href="cp.php?ac=common&op=report&idtype=uid&id=$space[uid]" id="a_report" onclick="ajaxmenu(event, this.id, 1)">违规举报</a></li>
			<!--{if checkperm('managename')||checkperm('managespacegroup')||checkperm('managespaceinfo')||checkperm('managespacecredit')||checkperm('managespacenote')}-->
			<li><img src="image/icon/profile.gif"><a href="admincp.php?ac=space&op=manage&uid=$space[uid]" id="a_manage">管理用户</a></li>
			<!--{/if}-->
		<!--{/if}-->
			</ul>
		</div><br />

		<div id="space_mymenu">
			<h2>个人菜单</h2>
			<ul class="line_list">
				<li>
					<!--{if $space[self]}-->
					<a href="cp.php?ac=profile" class="r_option" target="_blank">完善</a>
					<!--{/if}-->
					<img src="image/icon/profile.gif"><a href="javascript:;" onclick="getindex('info');">个人资料</a>
				</li>
				<li>
					<!--{if $space[self]}-->
					<a href="space.php?do=doing&view=me" class="r_option" target="_blank">记录</a>
					<!--{/if}-->
					<img src="image/icon/doing.gif"><a href="javascript:;" onclick="getindex('doing');">记录</a><!--{if $space[doingnum]}--><em>($space[doingnum])</em><!--{/if}-->
				</li>
				<li>
					<!--{if $space[self]}-->
					<a href="cp.php?ac=blog" class="r_option" target="_blank">发表</a>
					<!--{/if}-->
					<img src="image/icon/blog.gif"><a href="javascript:;" onclick="getindex('blog');">日志</a><!--{if $space[blognum]}--><em>($space[blognum])</em><!--{/if}--></li>
				<li><!--{if $space[self]}-->
					<a href="cp.php?ac=upload" class="r_option" target="_blank">上传</a>
					<!--{/if}-->
					<img src="image/icon/album.gif"><a href="javascript:;" onclick="getindex('album');">相册</a><!--{if $space[albumnum]}--><em>($space[albumnum])</em><!--{/if}--></li>
				<li><!--{if $space[self]}-->
					<a href="cp.php?ac=thread" class="r_option" target="_blank">发表</a>
					<!--{/if}-->
					<img src="image/icon/thread.gif"><a href="javascript:;" onclick="getindex('thread');">话题</a><!--{if $space[threadnum]}--><em>($space[threadnum])</em><!--{/if}--></li>
				<li><!--{if $space[self]}-->
					<a href="cp.php?ac=poll" class="r_option" target="_blank">发起</a>
					<!--{/if}-->
					<img src="image/icon/poll.gif"><a href="javascript:;" onclick="getindex('poll');">投票</a><!--{if $space[pollnum]}--><em>($space[pollnum])</em><!--{/if}--></li>
				<li><!--{if $space[self]}-->
					<a href="cp.php?ac=event" class="r_option" target="_blank">发起</a>
					<!--{/if}-->
					<img src="image/icon/event.gif"><a href="javascript:;" onclick="getindex('event');">活动</a><!--{if $space[eventnum]}--><em>($space[eventnum])</em><!--{/if}--></li>
				<li><!--{if $space[self]}-->
					<a href="space.php?do=share&view=me" class="r_option" target="_blank">添加</a>
					<!--{/if}-->
					<img src="image/icon/share.gif"><a href="javascript:;" onclick="getindex('share');">分享</a><!--{if $space[sharenum]}--><em>($space[sharenum])</em><!--{/if}--></li>
				<li><!--{if $space[self]}-->
					<a href="cp.php?ac=friend&op=search" class="r_option" target="_blank">寻找</a>
					<!--{/if}-->
					<img src="image/icon/friend.gif"><a href="javascript:;" onclick="getindex('friend');">好友</a><!--{if $space[friendnum]}--><em>($space[friendnum])</em><!--{/if}--></li>
			</ul>
		</div>

		<!--{if $guidelist}-->
		<div id="space_app_guide">
			<h2>应用菜单</h2>
			<ul class="line_list">
			<!--{loop $guidelist $value}-->
			<li id="space_app_profilelink_$value[appid]">
				<!--{if $space[self]}-->
				<a href="cp.php?ac=space&op=delete&appid=$value[appid]&type=profilelink" id="user_app_profile_$value[appid]" class="r_option float_del" style="position: static;" onclick="ajaxmenu(event, this.id)" title="删除">删除</a>
				<!--{/if}-->
				<img src="http://appicon.manyou.com/icons/$value[appid]"><!--{eval eval($value[profilelink]);}-->
			</li>
			<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->

		<!--{loop $narrowlist $value}-->
		<div id="space_app_$value[appid]">
			<h2>
				<!--{if $space[self]}-->
				<a href="cp.php?ac=space&op=delete&appid=$value[appid]" id="user_app_$value[appid]" class="r_option float_del" onclick="ajaxmenu(event, this.id)" title="删除">删除</a>
				<!--{/if}-->
				<a href="$value[appurl]">$value[appname]</a>
			</h2>
			<!--{if $value[myml]}-->
			<div class="box">
			<!--{eval eval($value[myml]);}-->
			</div>
			<!--{/if}-->
		</div>
		<!--{/loop}-->

	</div>

	<div id="content">
			
		<h3 id="spaceindex_name">
		<!--{if $_SCONFIG[realname]}-->
			<!--{if $space[name]}--><a href="space.php?uid=$space[uid]"<!--{eval g_color($space[groupid]);}-->>$space[name]</a><!--{else}-->未填写实名<!--{/if}-->
			&nbsp;<em>(用户名: $space[username])</em>
		<!--{else}-->
			<a href="space.php?uid=$space[uid]"<!--{eval g_color($space[groupid]);}-->>$space[username]</a>
			<!--{if $space[name]}-->&nbsp;<em>(姓名: $space[name])</em><!--{/if}-->
		<!--{/if}-->

		<!--{if $_SCONFIG[realname]}-->
			<!--{if $space[namestatus]}-->
				&nbsp;<img src="image/realname_yes.gif" align="absmiddle" alt="已通过实名认证">
			<!--{else}-->
				&nbsp;<img src="image/realname_no.gif" align="absmiddle" alt="未通过实名认证"> <span class="gray">实名未认证</span>
			<!--{/if}-->
		<!--{/if}-->
			
		<!--{if $_SCONFIG[videophoto]}-->	
			<!--{if $space[videostatus]}-->
				&nbsp;<img src="image/videophoto_yes.gif" align="absmiddle" alt="已通过视频认证"> <a id="a_space_videophoto" href="space.php?uid=$space[uid]&do=videophoto" onclick="ajaxmenu(event, this.id, 1)"><span style="color:red;font-weight:bold;font-size:12px;">查看视频认证照</span></a>
			<!--{else}-->
				&nbsp; <img src="image/videophoto_no.gif" align="absmiddle" alt="未通过视频认证"> <span class="gray"><a href="cp.php?ac=videophoto">视频未认证</a></span>
			<!--{/if}-->
		<!--{/if}-->
		</h3>


		<div id="spaceindex_note">
			<a href="cp.php?ac=share&type=space&id=$space[uid]" class="a_share" id="a_share" onclick="ajaxmenu(event, this.id, 1)">分享</a>
			<a href="rss.php?uid=$space[uid]" id="i_rss" title="订阅 RSS">订阅</a>
			
			<ul class="note_list">
				<li>已有 $space[viewnum] 人次访问, $space[credit] 个积分, $space[experience] 个经验 $space[star]</li>
				<li>用户组别：<a href="cp.php?ac=credit&op=usergroup">{$_SGLOBAL[grouptitle][$space[groupid]][grouptitle]}</a> <!--{eval g_icon($space[groupid]);}--></li>
				<li>主页地址：<a href="$space[domainurl]" onclick="javascript:setCopy('$space[domainurl]');return false;" class="spacelink domainurl">$space[domainurl]</a></li>
			
				<!--{if !$space[self] && $space[spacenote]}-->
				<li>$space[spacenote] <a href="space.php?uid=$space[uid]&do=doing">&raquo;</a></li>
				<!--{/if}-->
			</ul>
	
			<!--{if $space[self]}-->
				<!--{template space_status}-->
			<!--{/if}-->
		</div>

		<div id="maincontent">

		<!--{if !$space['isfriend']}-->
		<div class="borderbox">
			<p style="padding-bottom:10px;">如果您认识{$_SN[$space[uid]]}，可以给TA留个言，或者打个招呼，或者添加为好友。<br />成为好友后，您就可以第一时间关注到TA的更新动态。</p>
			<a href="cp.php?ac=friend&op=add&uid=$space[uid]" id="a_friend_notice" onclick="ajaxmenu(event, this.id, 1)" class="submit">加为好友</a></p>
		</div><br>
		<!--{/if}-->

		<div id="space_info">
			<h3 class="feed_header">
				<!--{if $space[self]}-->
				<a href="cp.php?ac=profile" class="r_option">完善资料</a>
				<!--{/if}-->
				个人资料
			</h3>
			<ul class="spacemenu_list">
				<li><em>创建:</em><!--{date('Y-m-d',$space[dateline],1)}--></li>
				<li><em>登录:</em><!--{if $space[lastlogin]}--><!--{date('Y-m-d',$space[lastlogin],1)}--><!--{/if}--></li>
				<!--{if $isonline}-->
				<li><em>活跃:</em>$isonline (当前在线)</li>
				<!--{/if}-->
			<!--{if $space[sex]}-->
				<li><em>性别:</em>$space[sex]</li>
			<!--{/if}-->
			<!--{if $space[birth]}-->
				<li><em>生日:</em>$space[birth]</li>
			<!--{/if}-->
			<!--{if $space[blood]}-->
				<li><em>血型:</em>$space[blood]</li>
			<!--{/if}-->
			<!--{if $space[marry]}-->
				<li><em>婚恋:</em>$space[marry]</li>
			<!--{/if}-->
			<!--{if $space[residecity]}-->
				<li><em>居住:</em>$space[residecity]</li>
			<!--{/if}-->
			<!--{if $space[birthcity]}-->
				<li><em>家乡:</em>$space[birthcity]</li>
			<!--{/if}-->
			<!--{if $space[mobile]}-->
				<li><em>手机:</em>$space[mobile]</li>
			<!--{/if}-->
			<!--{if $space[qq]}-->
				<li><em>QQ:</em>$space[qq]</li>
			<!--{/if}-->
			<!--{if $space[msn]}-->
				<li><em>MSN:</em>$space[msn]</li>
			<!--{/if}-->
			</ul>
			<p class="info_more"><a href="javascript:;" onclick="getindex('info');">&raquo; 查看全部个人资料</a></p>
		</div>

		<!--{if $feedlist}-->
		<!--{eval $_TPL['hidden_hot']=1;}-->
		<div id="space_feed" class="feed">
			<h3 class="feed_header">
				<span class="r_option">
				<a href="space.php?uid=$space[uid]&do=feed&view=me" class="action">全部</a>
				</span>
				<span class="entry-title">个人动态</span>
			</h3>
			<div class="box_content">
				<ul>
				<!--{loop $feedlist $value}-->
					<!--{template space_feed_li}-->
				<!--{/loop}-->
				</ul>
			</div>
		</div>
		<!--{/if}-->

		<!--{if $albumlist}-->
		<div id="space_photo">
			<h3 class="feed_header">
				<a href="space.php?uid=$space[uid]&do=album&view=me" class="r_option">全部</a>
				相册
			</h3>
			<table cellspacing="4" cellpadding="4" width="100%">
			<tr>
				<!--{loop $albumlist $key $value}-->
				<td width="85" align="center"><a href="space.php?uid=$space[uid]&do=album&id=$value[albumid]" target="_blank"><img src="$value[pic]" alt="$value[albumname]" width="70" /></a></td>
				<td width="165">
					<h6><a href="space.php?uid=$space[uid]&do=album&id=$value[albumid]" target="_blank" title="$value[albumname]">$value[albumname]</a></h6>
					<p class="gray">$value[picnum] 张照片</p>
					<p class="gray">更新于 <!--{date('m-d',$value[dateline],1)}--></p>
				</td>
				<!--{if $key%2==1}--></tr><tr><!--{/if}-->
				<!--{/loop}-->
			</tr>
			</table>
		</div>
		<!--{/if}-->

		<!--{if $bloglist}-->
		<div id="space_blog" class="feed">
			<h3 class="feed_header">
				<a href="space.php?uid=$space[uid]&do=blog&view=me" class="r_option">全部</a>
				日志
			</h3>
			<ul class="line_list">
			<!--{loop $bloglist $value}-->
				<li>
					
					<h4>
						<span class="gray r_option"><!--{date('m-d H:i',$value[dateline],1)}--></span>
						<a href="space.php?uid=$space[uid]&do=blog&id=$value[blogid]" target="_blank">$value[subject]</a>
					</h4>
					<div class="detail">
						$value[message]
					</div>
				</li>
			<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->


		<!--{loop $widelist $value}-->
		<!--{if $value[myml]}-->
		<div id="space_app_$value[appid]" class="appbox">
			<h3 class="feed_header">
				<!--{if $space[self]}-->
				<a href="cp.php?ac=space&op=delete&appid=$value[appid]" id="user_app_$value[appid]" class="r_option float_del" onclick="ajaxmenu(event, this.id)" title="删除">删除</a>
				<!--{/if}-->
				<a href="$value[appurl]">$value[appname]</a>
			</h3>
			<div class="box" style="margin: 0 0 20px;">
			<!--{eval eval($value[myml]);}-->
			</div>
		</div>
		<!--{/if}-->
		<!--{/loop}-->

		</div>

		<div id="comment" class="comments_list">
			<h3 class="feed_header">
				<a href="space.php?uid=$space[uid]&do=wall&view=me" class="r_option">全部</a>
				留言板
			</h3>

			<div class="box">
				<form action="cp.php?ac=comment" id="quick_commentform_{$space[uid]}" name="quick_commentform_{$space[uid]}" method="post" style="padding:0 0 0 5px;">
					<a href="###" id="editface" onclick="showFace(this.id, 'comment_message');return false;"><img src="image/facelist.gif" align="absmiddle" /></a>
					<!--{if $_SGLOBAL['magic']['doodle']}-->
					<a id="a_magic_doodle" href="magic.php?mid=doodle&showid=comment_doodle&target=comment_message" onclick="ajaxmenu(event, this.id, 1)"><img src="image/magic/doodle.small.gif" class="magicicon" />涂鸦板</a>
					<!--{/if}-->
					<br />
					<textarea name="message" id="comment_message" rows="4" cols="60" style="width:98%;" onkeydown="ctrlEnter(event, 'commentsubmit_btn');"></textarea><br>
					<input type="hidden" name="refer" value="space.php?uid=$space[uid]" />
					<input type="hidden" name="id" value="$space[uid]" />
					<input type="hidden" name="idtype" value="uid" />
					<input type="hidden" name="commentsubmit" value="true" />
					<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="留言" onclick="ajaxpost('quick_commentform_{$space[uid]}', 'wall_add')" />
					<span id="__quick_commentform_{$space[uid]}"></span>
					<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
				</form>
			</div>

			<div class="box_content">
				<ul class="post_list a_list justify_list" id="comment_ul">
				<!--{loop $walllist $value}-->
					<!--{template space_comment_li}-->
				<!--{/loop}-->
				</ul>
				<!--{if $walllist}-->
				<p class="r_option" style="padding:5px 0 10px 0;"><a href="space.php?uid=$space[uid]&do=wall&view=me">&raquo; 更多留言</a></p>
				<!--{/if}-->
			</div>
		</div>
	</div>

	<div id="obar">
		<!--{if !$space['self']}-->

			<!--{if $space['magiccredit']}-->
			<div class="magichongbao" id="div_magic_gift">
				<a id="a_magic_gift" href="cp.php?&ac=magic&op=receive&uid=$space[uid]" onclick="ajaxmenu(event, this.id)">送你 <span>$space[magiccredit]</span> 积分大红包</a>
			</div>
			<!--{/if}-->

			<!--{if $_SGLOBAL[magic][viewmagiclog] || $_SGLOBAL[magic][viewmagic] || $_SGLOBAL[magic][viewvisitor]}-->
			<div class="indexmagic">
			<!--{loop array('viewmagiclog','viewmagic','viewvisitor') $mid}-->
				<!--{if $_SGLOBAL[magic][$mid]}-->
				<a id="a_magic_{$mid}" href="magic.php?mid=$mid&idtype=uid&id=$space[uid]" onclick="ajaxmenu(event,this.id,1)">
				<img src="image/magic/{$mid}.small.gif" title="{$_SGLOBAL[magic][$mid]}" alt="{$_SGLOBAL[magic][$mid]}">
				</a>
				<!--{/if}-->
			<!--{/loop}-->
			</div>
			<!--{/if}-->
		<!--{else}-->
			<!--{if $_SGLOBAL[magic][gift]}-->
			<div class="magichongbao" id="div_magic_gift">				
				<!--{if $space['magiccredit']}-->
				<a id="a_magic_retrieve" href="cp.php?ac=magic&op=retrieve" onclick="ajaxmenu(event,this.id)">回收埋下的积分</a>
				<!--{else}-->
				<a id="a_magic_gift" href="magic.php?mid=gift" onclick="ajaxmenu(event,this.id,1)">给来访者埋个红包</a>
				<!--{/if}-->				
			</div>
			<!--{/if}-->
		<!--{/if}-->


		<!--{if $visitorlist}-->
		<div class="sidebox">
			<h2 class="title">
				<a href="space.php?uid=$space[uid]&do=friend&view=visitor" class="r_option">全部</a>
				最近来访
				<!--{if !$space[self] && $_SGLOBAL[magic][anonymous]}-->
				<span class="gray"><img title="$_SGLOBAL[magic][anonymous]" src="image/magic/anonymous.small.gif"/><a id="a_magic_anonymous" href="magic.php?mid=anonymous&idtype=uid&id=$space[uid]" onclick="ajaxmenu(event,this.id,1)">匿名</a></span>
				<!--{/if}-->
			</h2>
			<ul class="avatar_list">
				<!--{loop $visitorlist $key $value}-->
				<li>
					<!--{if $value[vusername] == ''}-->
					<div class="avatar48"><img src="image/magic/hidden.gif" alt="匿名" /></div>
					<p>匿名</p>
					<p class="gray"><!--{date('n月j日',$value[dateline],1)}--></p>
					<!--{else}-->
					<div class="avatar48"><a href="space.php?uid=$value[vuid]"><!--{avatar($value[vuid],small)}--></a></div>
					<p<!--{if $ols[$value[vuid]]}--> class="online_icon_p"<!--{/if}-->><a href="space.php?uid=$value[vuid]" title="{$_SN[$value[vuid]]}">{$_SN[$value[vuid]]}</a></p>
					<p class="gray"><!--{date('n月j日',$value[dateline],1)}--></p>
					<!--{/if}-->
				</li>
				<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->


		<!--{if $friendlist}-->
		<div class="sidebox">
			<h2 class="title">
			<span class="r_option">
				<a href="space.php?uid=$space[uid]&do=friend&view=me" class="action">全部($space[friendnum])</a>
			</span>
			好友
			</h2>
			<ul class="avatar_list">
				<!--{loop $friendlist $value}-->
				<li>
				<div class="avatar48"><a href="space.php?uid=$value[fuid]"><!--{avatar($value[fuid],small)}--></a></div>
				<p<!--{if $ols[$value[fuid]]}--> class="online_icon_p"<!--{/if}-->><a href="space.php?uid=$value[fuid]">{$_SN[$value[fuid]]}</a></p>
				</li>
				<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->

	</div>

</div>

<!--{if $_GET['theme']}--><div class="nn">您是否想使用这款个性风格?<br /><a href="cp.php?ac=theme&op=use&dir=<!--{$_GET['theme']}-->">[应用]</a><a href="cp.php?ac=theme">[取消]</a></div><!--{/if}-->
<!--{template footer}-->

<script>
function getindex(type) {
	var plus = '';
	if(type == 'event') plus = '&type=self';
	ajaxget('space.php?uid=$space[uid]&do='+type+'&view=me'+plus+'&ajaxdiv=maincontent', 'maincontent');
}

//彩虹炫
var elems = selector('div[class~=magicflicker]'); 
for(var i=0; i<elems.length; i++){
	magicColor(elems[i]);
}

</script>